package com.midian.action.mc.organization;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.midian.action.mc.common.AjaxAction;
import com.midian.common.annotation.FunctionAnnotationOverride;
import com.midian.model.organization.OrganizationType;
import com.midian.service.organization.IOrganizationTypeService;

/**
 * 机构类型Action
 * @author Mengfh
 *
 */
@Scope("prototype")
@Controller("organizationTypeAction")
@FunctionAnnotationOverride(isAction = true, auth = "机构类型管理")
public class OrganizationTypeAction extends AjaxAction<OrganizationType> {
	/**机构类型实体*/
	private OrganizationType entity;
	/**机构类型实体列表*/
	private List<OrganizationType> rows;
	/**机构类型业务*/
	private IOrganizationTypeService organizationTypeService;
	
	public OrganizationType getEntity() {
		return entity;
	}
	public void setEntity(OrganizationType entity) {
		this.entity = entity;
	}
	@Resource(name = "organizationTypeService")
	public void setOrganizationTypeService(IOrganizationTypeService organizationTypeService) {
		this.service = organizationTypeService;
		this.organizationTypeService = organizationTypeService;
	}
	@Override
	protected OrganizationType dytEntity() {
		if(this.entity == null) {
			this.entity = new OrganizationType();
		}
		return getEntity();
	}
	@Override
	protected void dyEntity(OrganizationType t) {
		setEntity(t);
	}
	@Override
	public void setRows(List<OrganizationType> rows) {
		this.rows = rows;
	}
	@Override
	public List<OrganizationType> getRows() {
		return rows;
	}
}
